# 1 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"
;$DIR=/opt/topspin3.2/exp/stan/nmr/lists/pp/user/echo.bjw
;$CLASS=Solids
;$DIM=1D
;  F1 -> directly acquired
;$TYPE=direct excitation
;$COMMENT=Refocuses spin interactions that reverse sign under a pi pulse
;  OPTIONS: Presaturation, half-echo acquisition, heteronuclear decoupling on f2
;  Avance III, TS 3.5.4 has issue where cnst does not display if f2 is not displayed (still runs properly)

;ns 4-step phase cycle
;p1 X pi/2 pulse
;p2 X pi pulse
;pl1 pulse power on channel f1
;d1 recycle delay
;l6 echo shift / rotor periods
;cnst31 spin rate / Hz

;zgoptns -Dsat -Dfid -Ddec
;p20 saturation pulse length
;p21 1H saturation pulse length
;p31 1H decoupling pulse length
;pl2 =120; not used
;pl20 saturation pulse power
;pl21 1H saturation pulse power
;d20 saturation delay
;l20 saturation pulse loops
;pl12 decoupling power level
;pl13 decoupling power level
;pcpd2 1H decoupling program pulse
;cpdprg2 cw, tppm, spinal (pl12), fslg (pl13)
# 1 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/Avance.incl" 1
;Avance3.incl
;   for AV III
;
;avance-version (13/06/17)
;
;$CLASS=HighRes Incl
;$COMMENT=


# 169 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/Avance.incl"
;$Id: Avance3.incl,v 1.10.2.2 2013/08/30 09:43:33 ber Exp $
# 33 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw" 2

define pulse tr                      ;rotor period
  "tr=1s/cnst31"
define pulse tau                     ;echo shift
  "tau=l6*tr"

"d6=tau-p2/2"
# 42 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"
"d7=d6-de"


# 1 "mc_line 49 file /opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw exp. def. part of mc cmd. before ze"
; dimension 1D; AQ_mode 
define delay MCWRK
define delay MCREST
"MCREST = 10m - 10m"
"MCWRK = 0.333333*10m"

    dccorr
# 49 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"
# 49 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"
1  ze
# 1 "mc_line 49 file /opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw exp. def. of mc cmd. after ze"
# 50 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"
# 1 "mc_line 50 file /opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw exp. start label for mc cmd."
2 MCWRK  * 2
LBLF0, MCWRK
  MCREST
# 51 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"
3  1u

# 69 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"

   d1 pl1:f1                        ;recycle delay and preselection of f1 drive power
# 76 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"
   (p1 ph1):f1
   d6
   (p2 ph2):f1


   d7                                ;wait until echo top to activate receiver
# 84 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"
   go=3 ph31


# 1 "mc_line 90 file /opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw exp. mc cmd. in line"
  MCWRK wr #0
  MCWRK zd
  lo to LBLF0 times td0

# 91 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"
# 91 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echo.bjw"
exit

ph1 = 0 2 1 3
ph2 = 0
ph20= 0 1
ph21= 0 1
ph30= 0
ph31= 0 2 3 1
